package training.charmy.singleton;

public class Singleton {

	private static Singleton instance;

	static{
		
		System.out.println("This is a static block invoked during class loading");
	      
	}

	public static Singleton getInstance()
	
	{
			if (instance== null)	{
		instance=new Singleton();
		}

			return instance;
	}
	
	private Singleton ()
	{
	
		System.out.println("within constructor");
		
	
	}
	
}